package com.gp.model.dto;

import java.io.Serializable;
import java.util.Date;

import org.springframework.util.StringUtils;

import com.gp.common.utils.StringUtil;
import com.gp.model.entity.BaseGoods;
import com.gp.model.entity.BaseGoodsProperty;

/**
 * @author: 弓成龙
 * @date : 2017年12月16日
 * @email : gcx909109@sina.cn
 * @description: 封装返回的商品详细列表
 */
public class GoodsDetailDto implements Serializable {

  private static final long serialVersionUID = -6887435701571852231L;

  private Long id;
  private String goodsName;
  private String characterDesc;
  private String state;
  private String auditStatus;
  private Long price;
  private Long marketPrice;
  private String deliveryLimit;
  private String images;
  private String weight;
  private String isrec;
  private Date upTime = new Date();
  private Date downTime;
  private String returnRule;
  private String exchangeRule;
  private String freight;
  private Integer stock;
  private String characteristic;

  /**
   * 属性表的相关属性
   */
  private Long goodsId;
  private String brand;
  private String goodsType;
  private String seatsTyle;
  private String installWay;
  private String suitAge;
  private String fixedWay;
  private String suitWeight;
  private String supplierName;
  private String productionDate;
  private String placeoforiginCode;
  private String placeoforiginName;
  private String other;

  public GoodsDetailDto() {}

  public GoodsDetailDto(Long id, String goodsName, String characterDesc, String state,
      String auditStatus, Long price, Long marketPrice, String deliveryLimit, String images,
      String weight, String isrec, Date upTime, Date downTime, String returnRule,
      String exchangeRule, String freight, Integer stock, String characteristic, Long goodsId,
      String brand, String goodsType, String seatsTyle, String installWay, String suitAge,
      String fixedWay, String suitWeight, String supplierName, String productionDate,
      String placeoforiginCode, String placeoforiginName, String other) {
    this.id = id;
    this.goodsName = goodsName;
    this.characterDesc = characterDesc;
    this.state = state;
    this.auditStatus = auditStatus;
    this.price = price;
    this.marketPrice = marketPrice;
    this.deliveryLimit = deliveryLimit;
    this.images = images;
    this.weight = weight;
    this.isrec = isrec;
    this.upTime = upTime;
    this.downTime = downTime;
    this.returnRule = returnRule;
    this.exchangeRule = exchangeRule;
    this.freight = freight;
    this.stock = stock;
    this.characteristic = characteristic;
    this.goodsId = goodsId;
    this.brand = brand;
    this.goodsType = goodsType;
    this.seatsTyle = seatsTyle;
    this.installWay = installWay;
    this.suitAge = suitAge;
    this.fixedWay = fixedWay;
    this.suitWeight = suitWeight;
    this.supplierName = supplierName;
    this.productionDate = productionDate;
    this.placeoforiginCode = placeoforiginCode;
    this.placeoforiginName = placeoforiginName;
    this.other = other;
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getGoodsName() {
    return goodsName;
  }

  public void setGoodsName(String goodsName) {
    this.goodsName = goodsName;
  }

  public String getCharacterDesc() {
    return characterDesc;
  }

  public void setCharacterDesc(String characterDesc) {
    this.characterDesc = characterDesc;
  }

  public String getState() {
    return state;
  }

  public void setState(String state) {
    this.state = state;
  }

  public String getAuditStatus() {
    return auditStatus;
  }

  public void setAuditStatus(String auditStatus) {
    this.auditStatus = auditStatus;
  }

  public Long getPrice() {
    return price;
  }

  public void setPrice(Long price) {
    this.price = price;
  }

  public Long getMarketPrice() {
    return marketPrice;
  }

  public void setMarketPrice(Long marketPrice) {
    this.marketPrice = marketPrice;
  }

  public String getDeliveryLimit() {
    return deliveryLimit;
  }

  public void setDeliveryLimit(String deliveryLimit) {
    this.deliveryLimit = deliveryLimit;
  }

  public String getImages() {
    return images;
  }

  public void setImages(String images) {
    this.images = images;
  }

  public String getWeight() {
    return weight;
  }

  public void setWeight(String weight) {
    this.weight = weight;
  }

  public String getIsrec() {
    return isrec;
  }

  public void setIsrec(String isrec) {
    this.isrec = isrec;
  }

  public Date getUpTime() {
    return upTime;
  }

  public void setUpTime(Date upTime) {
    this.upTime = upTime;
  }

  public Date getDownTime() {
    return downTime;
  }

  public void setDownTime(Date downTime) {
    this.downTime = downTime;
  }

  public String getReturnRule() {
    return returnRule;
  }

  public void setReturnRule(String returnRule) {
    this.returnRule = returnRule;
  }

  public String getExchangeRule() {
    return exchangeRule;
  }

  public void setExchangeRule(String exchangeRule) {
    this.exchangeRule = exchangeRule;
  }

  public String getFreight() {
    return freight;
  }

  public void setFreight(String freight) {
    this.freight = freight;
  }

  public Integer getStock() {
    return stock;
  }

  public void setStock(Integer stock) {
    this.stock = stock;
  }

  public String getCharacteristic() {
    return characteristic;
  }

  public void setCharacteristic(String characteristic) {
    this.characteristic = characteristic;
  }

  public Long getGoodsId() {
    return goodsId;
  }

  public void setGoodsId(Long goodsId) {
    this.goodsId = goodsId;
  }

  public String getBrand() {
    return brand;
  }

  public void setBrand(String brand) {
    this.brand = brand;
  }

  public String getGoodsType() {
    return goodsType;
  }

  public void setGoodsType(String goodsType) {
    this.goodsType = goodsType;
  }

  public String getSeatsTyle() {
    return seatsTyle;
  }

  public void setSeatsTyle(String seatsTyle) {
    this.seatsTyle = seatsTyle;
  }

  public String getInstallWay() {
    return installWay;
  }

  public void setInstallWay(String installWay) {
    this.installWay = installWay;
  }

  public String getSuitAge() {
    return suitAge;
  }

  public void setSuitAge(String suitAge) {
    this.suitAge = suitAge;
  }

  public String getFixedWay() {
    return fixedWay;
  }

  public void setFixedWay(String fixedWay) {
    this.fixedWay = fixedWay;
  }

  public String getSuitWeight() {
    return suitWeight;
  }

  public void setSuitWeight(String suitWeight) {
    this.suitWeight = suitWeight;
  }

  public String getSupplierName() {
    return supplierName;
  }

  public void setSupplierName(String supplierName) {
    this.supplierName = supplierName;
  }

  public String getProductionDate() {
    return productionDate;
  }

  public void setProductionDate(String productionDate) {
    this.productionDate = productionDate;
  }

  public String getPlaceoforiginCode() {
    return placeoforiginCode;
  }

  public void setPlaceoforiginCode(String placeoforiginCode) {
    this.placeoforiginCode = placeoforiginCode;
  }

  public String getPlaceoforiginName() {
    return placeoforiginName;
  }

  public void setPlaceoforiginName(String placeoforiginName) {
    this.placeoforiginName = placeoforiginName;
  }

  public String getOther() {
    return other;
  }

  public void setOther(String other) {
    this.other = other;
  }

  /**
   * 获取商品的基本属性
   * 
   * @return
   */
  public BaseGoods obtainBaseGoodsInfo() {
    return new BaseGoods(id, goodsName, characterDesc, state, auditStatus, price, marketPrice,
        deliveryLimit, images, weight, isrec, upTime, downTime, returnRule, exchangeRule, freight,
        stock, characteristic);
  }

  /**
   * 获取商品的私有属性
   * 
   * @return
   */
  public BaseGoodsProperty obtainBaseGoodsProperty() {
    return new BaseGoodsProperty(null, goodsId, brand, goodsName, goodsType, seatsTyle, installWay,
        suitAge, fixedWay, suitWeight, supplierName, productionDate, placeoforiginCode,
        placeoforiginName, other);
  }

}

